﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
using System.ComponentModel;
using OpenESSOConfigurator.BusinessLayer.Atoms;
using OpenESSOConfigurator.BusinessLayer.Stores;


namespace OpenESSOConfigurator.BusinessLayer
{
    [Serializable]
    [XmlRoot("OpenESSOConfiguration")]
    public class OpenESSOConfiguration
    {
        private Applications _applications;
        private BindingList<CredentialSharingGroup> _credentialSharingGroups;
        private BindingList<PasswordPolicy> _passwordPolicies;
        private BindingList<ConfigurationStore> _configurationStores;
        

        public OpenESSOConfiguration()
        {
        }
        [XmlElement("Applications")]
        public Applications Applications
        {
            get { return _applications; }
            set { _applications = value; }
        }
        [XmlArray("CredentialSharingGroups")]
        public BindingList<CredentialSharingGroup> CredentialSharingGroups
        {
            get { return _credentialSharingGroups; }
            set { _credentialSharingGroups = value; }
        }
        [XmlArray("PasswordPolicies")]
        public BindingList<PasswordPolicy> PasswordPolicies
        {
            get { return _passwordPolicies; }
            set { _passwordPolicies = value; }
        }

        [XmlArray("ConfigurationStores")]
        public BindingList<ConfigurationStore> ConfigurationStores
        {
            get { return _configurationStores; }
            set { _configurationStores = value; }
        }
    }
}
